package com.songlanyun.modules.sysbill.controller.admin;

import java.util.Arrays;
import java.util.Map;

import com.songlanyun.common.validator.ValidatorUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.songlanyun.modules.sysbill.entity.SysBill;
import com.songlanyun.modules.sysbill.service.SysBillService;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.common.utils.R;


/**
 * 系统帐单
 *
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2020-11-20 09:53:18
 */
@RestController
@RequestMapping("admin/sys/bill")
public class SysBillAdminController {
    @Autowired
    private SysBillService sysBillService;

    /**
     * 列表
     */
    @RequestMapping("/list")
//    @RequiresPermissions("sysbill:sysbill:list")
    public R list(@RequestParam Map<String, Object> params) {
        PageUtils page = sysBillService.queryPage(params);

        return R.ok().put("page", page);
    }


    /**
     * 信息
     */
    @RequestMapping("/info/{id}")
//    @RequiresPermissions("sysbill:sysbill:info")
    public R info(@PathVariable("id") Long id) {
        SysBill sysBill = sysBillService.getById(id);

        return R.ok().put("data", sysBill);
    }


}
